import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import Introduce from "../components/Introduce";
import Navigation from "../components/Navigation";
import Road from "../components/Road";
import one from "../components/road/one";
import two from "../components/road/two";
import three from "../components/road/three";
import station from "../components/road/station";
import Huan from "../components/road/Huan";
import Recommend from "../components/Recommend";
import Register from "../components/Register.vue";
import  Manager from "../components/Manager";
import StaffManagement from "../components/StaffManagement"

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/recommend",
    component: Recommend,
  },
  {
    path: "/tw",
    component: two,
  },
  {
    path: "/on",
    component: one,
  },
  {
    path: "/th",
    component: three,
  },
  {
    path: "/huan",
    component: Huan,
  },
  {
    path: "/station",
    component: station,
  },
  {
    path: "/d",
    component: Navigation,
  },
  {
    path: "/road",
    component: Road,
  },
  {
    path: "/register",
    component: Register,
  },
  {
    path: "/introduce",
    component: Introduce,
  },
  {
    path: "/Manager",
    component: Manager,
    children: [
      {
        path: '/Manager/staffManagement',
        component: StaffManagement
      }
    ]
  },
  {
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/About.vue"),
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
